<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2017/12/29
 * Time: 18:33
 */

namespace App\Http\Controllers\MiniProgram;


use App\Http\Logics\MiniProgram\StandardValueLogic;
use App\Http\Traits\StandardValueTrait;
use App\Http\Controllers\BaseController;
class StandardValueController extends BaseController
{
    use StandardValueTrait;

    /**
     * 创建规格值
     * @return string 返回添加结果
     */
    public function createStandardValue()
    {
        $standard_id = $this->standard_id;
        $value = $this->value;
        $data = [
            'standard_id' => $standard_id,
            'value' => $value
        ];
        $response = StandardValueLogic::createStandardValue($data);
        if ($response->code){
            return $this->response($response->code, $response->message);
        }
        return $this->response($response->code, $response->message, $response->data);
    }
}